documented: HashSet<&'a PackageId>,
counts: HashMap<&'a PackageId, usize>,
is_release: bool,
- is_doc_all: bool,
}
/// A helper structure for metadata about the state of a building package.
documented: HashSet::new(),
counts: HashMap::new(),
is_release: cx.build_config.release,
- is_doc_all: cx.build_config.doc_all,
}
}
duration.as_secs(),
duration.subsec_nanos() / 10000000);
if self.queue.is_empty() {
- if !self.is_doc_all {
- cx.config.shell().status("Finished", format!("{} [{}] target(s) in {}",
- build_type,
- opt_type,
- time_elapsed))?;
- }
+ let message = format!("{} [{}] target(s) in {}",
+ build_type,
+ opt_type,
+ time_elapsed);
+ cx.config.shell().status("Finished", message)?;
Ok(())
} else if let Some(e) = error {
Err(e)
.with_stderr("\
[DOCUMENTING] foo v0.5.0 (file://[..])
[RUNNING] `rustdoc [..]`
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
File::create(&p.root().join("src/main.rs")).unwrap()
execs().with_status(0).with_stderr(&format!("\
[..] foo v0.0.1 ({dir})
[..] foo v0.0.1 ({dir})
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
dir = path2url(p.root()))));
assert_that(&p.root().join("target/doc"), existing_dir());
assert_that(p.cargo_process("doc"),
execs().with_status(0).with_stderr(&format!("\
[DOCUMENTING] foo v0.0.1 ({dir})
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
dir = path2url(p.root()))));
[..] bar v0.0.1 ({dir}/bar)
[..] bar v0.0.1 ({dir}/bar)
[DOCUMENTING] foo v0.0.1 ({dir})
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
dir = path2url(p.root()))));
[..] b v0.0.1 (file://[..])
[..] b v0.0.1 (file://[..])
[DOCUMENTING] a v0.0.1 (file://[..])
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}
.with_stderr("\
[DOCUMENTING] foo v0.0.1 ([..])
[RUNNING] `rustdoc [..] src[/]lib.rs [..]`
+[FINISHED] release [optimized] target(s) in [..]
"));
}
assert_that(p.cargo("doc").env("RUSTDOCFLAGS", "--cfg=foo"),
execs().with_status(0));
assert_that(p.cargo("doc").env("RUSTDOCFLAGS", "--cfg=foo"),
- execs().with_status(0).with_stderr(""));
+ execs().with_status(0).with_stderr("\
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
+"));
assert_that(p.cargo("doc").env("RUSTDOCFLAGS", "--cfg=bar"),
execs().with_status(0).with_stderr("\
[DOCUMENTING] foo v0.0.1 ([..])
+[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}